package org.fengling.readingplatform.common.exception;

import lombok.Data;
import org.fengling.readingplatform.model.vo.common.ResultCodeEnum;

@Data
public class FenglingException extends RuntimeException{

    private Integer code;
    private String message;

    private ResultCodeEnum resultCodeEnum;

    public FenglingException(ResultCodeEnum resultCodeEnum){
        this.resultCodeEnum = resultCodeEnum ;
        this.code = resultCodeEnum.getCode() ;
        this.message = resultCodeEnum.getMessage();
    }
}
